package mx.ipn.escom.redes.gestionarsala.dao;

import java.util.List;

import javax.inject.Named;

import mx.ipn.escom.redes.equipo.model.Sala;

import org.springframework.orm.hibernate4.support.HibernateDaoSupport;

@Named("salaDao")
public class SalaDao extends HibernateDaoSupport {
	
	public List<Sala> findAll() {
		return getHibernateTemplate().loadAll(Sala.class);
	}
	
	public Sala findById(Sala sala) {
		return getHibernateTemplate().get(Sala.class, sala.getIdSala());
	}

}
